#define DEBUG 0
#include "./header/TextQuery.h"
#include "./header/Query.h"
#include "./header/InputParser.h"

#include<stdlib.h>
using namespace std;

void testProgram(InputParser &inpsr)
{
    ifstream ifs("./data/testinq");
    string str;
    while (getline(ifs, str))
    {
        inpsr.execQueries(str);
        cout << "\n";
    }
}

string getinput(){
    string str; 
    getline(cin,str);
    return str;
}

int main()
{   
    string filePath = "./data/storyDataFile";

    TextQuery tq(filePath);
    tq.showText();
    InputParser inpsr(tq);


    cout << "input the word or exp you want query: " << endl;
    string inq = getinput();
    while(!inq.empty()){   
        inpsr.execQueries(inq);
        cout << "input the word or exp you want query: " << endl;
        inq = getinput();
    }
    cout << highlight("program exited successfully\n");
    return 0;
}